# 封装断言方法
from api.ihrm_login_api import login_api


def common_assert(status_code,success,code,message,resp):
    assert status_code == resp.status_code
    assert success == resp.json()['success']
    assert code == resp.json()['code']
    assert message in resp.json()['message']


if __name__ == '__main__':
    resp = login_api.login('13800000002','123456')
    print(resp.json())
    common_assert(200,True,10000,'成功',resp)